import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
//颜色
class AppColors {
  static const String primaryValueString = "#24292E";
  static const String primaryLightValueString = "#42464b";
  static const String primaryDarkValueString = "#121917";
  static const String miWhiteString = "#ececec";
  static const String actionBlueString = "#267aff";
  static const String webDraculaBackgroundColorString = "#282a36";

  static const int primaryValue = 0xFF24292E;
  static const int primaryLightValue = 0xFF42464b;
  static const int primaryDarkValue = 0xFF121917;

  static const int cardWhite = 0xFFFFFFFF;
  static const int textWhite = 0xFFFFFFFF;
  static const int miWhite = 0xffececec;
  static const int white = 0xFFeeeeee; //白色 辅助色2
  static const int lightWhite = 0xFFfdfdfd; //白色 辅助色2
  static const int actionBlue = 0xff267aff;
  static const int subTextColor = grey900;
  static const int subLightTextColor = grey900;

  static const int Grey = grey800;
  static const int primaryColor = black;
  static const int cyan = 0xff00adb5;  //青 辅助色1
  static const int black = 0xff303841; //黑 主色
  static const int darkBlue = 0xff0d47a1;
  static const int lightGray = 0xfff5f5f5;
  static const int grey800 = 0x5f424242;
  static const int grey900 = 0xaf212121;
  static const int orangeA700 = 0xFFff5722; //橘黄 辅助色3
  static const int translucenceWhite = 0xcfffffff;
  static const int translucenceWhite2 = 0xefffffff;
  static const int mainBackgroundColor = miWhite;

  static const int mainTextColor = primaryDarkValue;
  static const int textColorWhite = white;

  static const MaterialColor primarySwatch = const MaterialColor(
    primaryValue,
    const <int, Color>{
      50: const Color(primaryLightValue),
      100: const Color(primaryLightValue),
      200: const Color(primaryLightValue),
      300: const Color(primaryLightValue),
      400: const Color(primaryLightValue),
      500: const Color(primaryValue),
      600: const Color(primaryDarkValue),
      700: const Color(primaryDarkValue),
      800: const Color(primaryDarkValue),
      900: const Color(primaryDarkValue),
    },
  );
}

class AppSize {
  //配置设计稿尺寸 默认 360.0 / 640.0 / 3.0  比例9/16
  //首页
  static double homeSliderImageWidget = ScreenUtil.getInstance().getWidth(100);
  static double homeIconSize =ScreenUtil.getInstance().getWidth(30);
  static double silderImageWidth =ScreenUtil.getInstance().getWidth(340);
  static double vipImageSize =ScreenUtil.getInstance().getWidth(40);
  static double shopImageWidth =ScreenUtil.getInstance().getWidth(80);
  static double shopImageHeight =ScreenUtil.getInstance().getWidth(130);
  static double shopItemHeight =ScreenUtil.getInstance().getWidth(40);
  static double userIconSize =ScreenUtil.getInstance().getWidth(140);

  //获取真实宽度
  static double getRealWidth(double size){
    return ScreenUtil.getInstance().getWidth(size);
  }

  //获取真实高度
  static double getRealHeight(double size) {
    return ScreenUtil.getInstance().getHeight(size);
  }

  //获取真实字体大小
  static double getRealSp(double size) {
    return ScreenUtil.getInstance().getSp(size);
  }
  static double ScreenWidth = ScreenUtil.getInstance().screenWidth;
  static double ScreenHeight = ScreenUtil.getInstance().screenHeight;
  static double AvailableHeight = ScreenHeight-ScreenUtil.getInstance().statusBarHeight-ScreenUtil.getInstance().appBarHeight-ScreenUtil.getInstance().bottomBarHeight;
}

//文本样式
class AppConstant {

  static const String app_default_share_url = "https://github.com/CarGuo/GSYGithubAppFlutter";

  static double lagerTextSize = 30;
  static double bigTextSize = 23.0;
  static double normalTextSize = 18.0;
  static double middleTextWhiteSize = 16.0;
  static double middleTextSize = 20.0;
  static double smallTextSize = 14.0;
  static double minTextSize = 12.0;

  static TextStyle minText = TextStyle(
    color: Color(AppColors.subLightTextColor),
    fontSize: minTextSize,
  );

  static TextStyle smallTextWhite = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: smallTextSize,
  );

  static TextStyle smallText = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: smallTextSize,
  );

  static TextStyle smallTextBold = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: smallTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle smallSubLightText = TextStyle(
    color: Color(AppColors.subLightTextColor),
    fontSize: smallTextSize,
  );

  static TextStyle smallActionLightText = TextStyle(
    color: Color(AppColors.actionBlue),
    fontSize: smallTextSize,
  );

  static TextStyle smallMiLightText = TextStyle(
    color: Color(AppColors.miWhite),
    fontSize: smallTextSize,
  );

  static TextStyle smallSubText = TextStyle(
    color: Color(AppColors.subTextColor),
    fontSize: smallTextSize,
  );

  static TextStyle middleText = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: middleTextWhiteSize,
  );

  static TextStyle middleTextWhite = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: middleTextWhiteSize,
  );

  static TextStyle middleSubText = TextStyle(
    color: Color(AppColors.subTextColor),
    fontSize: middleTextWhiteSize,
  );

  static TextStyle middleSubLightText = TextStyle(
    color: Color(AppColors.subLightTextColor),
    fontSize: middleTextWhiteSize,
  );

  static TextStyle middleTextBold = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: middleTextWhiteSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle middleTextWhiteBold = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: middleTextWhiteSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle middleSubTextBold = TextStyle(
    color: Color(AppColors.subTextColor),
    fontSize: middleTextWhiteSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle normalText = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: normalTextSize,
  );

  static TextStyle normalTextBold = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle normalSubText = TextStyle(
    color: Color(AppColors.subTextColor),
    fontSize: normalTextSize,
  );

  static TextStyle normalTextWhite = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: normalTextSize,
  );

  static TextStyle normalTextMitWhiteBold = TextStyle(
    color: Color(AppColors.miWhite),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle normalTextActionWhiteBold = TextStyle(
    color: Color(AppColors.actionBlue),
    fontSize: normalTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle normalTextLight = TextStyle(
    color: Color(AppColors.primaryLightValue),
    fontSize: normalTextSize,
  );

  static TextStyle largeText = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: bigTextSize,
  );

  static TextStyle largeTextBold = TextStyle(
    color: Color(AppColors.mainTextColor),
    fontSize: bigTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle largeTextWhite = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: bigTextSize,
  );

  static TextStyle largeTextWhiteBold = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: bigTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle largeLargeTextWhite = TextStyle(
    color: Color(AppColors.textColorWhite),
    fontSize: lagerTextSize,
    fontWeight: FontWeight.bold,
  );

  static TextStyle largeLargeText = TextStyle(
    color: Color(AppColors.primaryValue),
    fontSize: lagerTextSize,
    fontWeight: FontWeight.bold,
  );
}

class AppIcon {

  static const String FONT_FAMILY = "iconFont";

  static IconData FITNESS_ROOM2 = new IconData(0xe6d9,fontFamily: FONT_FAMILY);
  static IconData FITNESS_ROOM1 = new IconData(0xe678,fontFamily: FONT_FAMILY);
  static IconData FITNESS_ROOM3 = new IconData(0xe65d,fontFamily: FONT_FAMILY);
  static IconData MONEY = new IconData(0xe652,fontFamily: FONT_FAMILY);
  static IconData ADDRESS = new IconData(0xe60d,fontFamily: FONT_FAMILY);
  static IconData MUSCLE_MAN = new IconData(0xe62c,fontFamily: FONT_FAMILY);
  static IconData CALL = new IconData(0xe61d,fontFamily: FONT_FAMILY);
  static IconData TIME = new IconData(0xe52f,fontFamily: FONT_FAMILY);
  static IconData CYCLE = new IconData(0xe612,fontFamily: FONT_FAMILY);
  static IconData CLASS_LIST = new IconData(0xe637,fontFamily: FONT_FAMILY);
  static IconData VIP = new IconData(0xe70a,fontFamily: FONT_FAMILY);
  static IconData SUBSCRIBER = new IconData(0xe611,fontFamily: FONT_FAMILY);
  static IconData CARD = new IconData(0xe70c,fontFamily: FONT_FAMILY);
  static IconData TEAM = new IconData(0xe705,fontFamily: FONT_FAMILY);
  static IconData MINE = new IconData(0xe643,fontFamily: FONT_FAMILY);
  static IconData DIST = new IconData(0xe60b,fontFamily: FONT_FAMILY);
  static IconData MANAGER = new IconData(0xe602,fontFamily: FONT_FAMILY);
}